package com.zhuss.food.db.dao.ext;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zhuss.bean.bo.food.product.SearchProductBo;
import com.zhuss.bean.vo.food.product.DetailProductVo;
import com.zhuss.bean.vo.food.product.ListProductVo;
import com.zhuss.food.db.dao.gen.ProductMapper;
import com.zhuss.food.db.entity.Product;

@Mapper
public interface ProductDao extends ProductMapper {
	
	Integer used(@Param("productId") Long productId, @Param("count") Long count);
	
	void create(Product record);
	
	void delete(Product record);
	
	List<Product> listAll(@Param("area") Integer area, @Param("status") Integer status);

	List<ListProductVo> list(SearchProductBo bo);

	Integer countList(SearchProductBo bo);

	DetailProductVo detail(@Param("productId") Long productId);
	
	List<Product> listByName(@Param("type") Integer type, @Param("name") String name, @Param("area") Integer area);
	
	List<Product> listWeek(@Param("type") Integer type, @Param("foodId") Long foodId, @Param("date") Date date, @Param("productTime") Integer productTime, @Param("floor") Integer floor, @Param("area") Integer area);
	
	List<Product> listByFood(@Param("foodId") Long foodId);
	
	List<Product> listProduct(@Param("status") Integer status, @Param("type") Integer type, @Param("startTime") Date startTime, @Param("category") Integer category, @Param("date") Date date, @Param("area") Integer area);
	
	List<Product> listMenu(@Param("status") Integer status, @Param("date") Date date, @Param("productTime") Integer productTime, @Param("floor") Integer floor, @Param("area") Integer area, @Param("type") Integer type);
	
	void newFresh(@Param("foodId") Long foodId, @Param("category") Integer category, @Param("name") String name);

	void newFreshPrice(@Param("foodId") Long foodId, @Param("price") Long price, @Param("typeList") List<Integer> typeList);

    
}